QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    cananalysis.cpp \
    canig.cpp \
    canigbus.cpp \
    cansettings.cpp \
    main.cpp \
    mainwindow.cpp \
    newcanselinfopage.cpp \
    sendthread.cpp \
    worker.cpp

HEADERS += \
    ThreadInterface.h \
    cananalysis.h \
    canig.h \
    canigbus.h \
    cansettings.h \
    include/canevt.h \
    include/canlib.h \
    include/canstat.h \
    include/extras/poppack.h \
    include/extras/pshpack1.h \
    include/j1587lib.h \
    include/kvDiag.h \
    include/kvaDbLib.h \
    include/kvaMemoLibXML.h \
    include/kvaser_stdint.h \
    include/kvlclib.h \
    include/kvmlib.h \
    include/kvrlib.h \
    include/linlib.h \
    include/obsolete.h \
    include/predef.h \
    include/sing.h \
    include/std.h \
    mainwindow.h \
    newcanselinfopage.h \
    sendthread.h \
    worker.h

FORMS += \
    cananalysis.ui \
    canig.ui \
    canigbus.ui \
    cansettings.ui \
    mainwindow.ui \
    newcanselinfopage.ui

TRANSLATIONS +=
CONFIG += lrelease
CONFIG += embed_translations

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    myres.qrc

win32: LIBS += -L$$PWD/include -lcanlib32
win32: LIBS += -L$$PWD/include -lkvaDbLib

INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD/include

win32-g++: PRE_TARGETDEPS += $$PWD/include/canlib32.lib
else:win32-g++: PRE_TARGETDEPS += $$PWD/include/canlib32.a
# else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../canlib/Lib/release/canlib32.lib
# else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../canlib/Lib/debug/canlib32.lib

DISTFILES += \
    include/canlib.pas \
    include/canlib32.lib \
    include/kvaDbLib.lib \
    include/kvaMemoLib.lib \
    include/kvaMemoLibXML.lib \
    include/kvlclib.lib \
    include/kvmlib.lib \
    include/kvrlib.lib \
    include/linlib.lib
